<div class="kuofooter">
    <div class="layui-container ">
      {{THIS.$WANGZHAN['content']}}   
    </div>
    
</div>
</body>
</html>

<script src="{{CDNHOST}}Tpl/jquery.js"></script>
<script src="{{CDNHOST}}Tpl/layui/layui.js"></script>
<script>
function soso(){

  var keys = document.getElementById("keys").value; 
  if(keys == ""){
      layer.msg("请输入关键词");
      return false;
  }

  var value = localStorage.getItem("SOSO");
  if (!value || value == "") {
      value = '[]';
  }
  value = JSON.parse(value);
  if(value){
    var changdu =  value.length;
    if(value.indexOf(keys) <= -1){
      value.push(keys);
      if(changdu > 50){
        var mx = changdu - 50;
        for(var mm = 0; mm < mx;mm++){
          value.shift(0);
        }
      }
      localStorage.setItem('SOSO',JSON.stringify(value));
    }
  }
  window.location.href = "{{KuoLink([KUO.CLASS,'soso'],2)}}"+keys+"{{WebExt}}";

  return false;
}
var UID = 0;
var APPTOKEN = localStorage.getItem("APPTOKEN");
var FENGE = '{{FENGE}}';
if(!APPTOKEN || APPTOKEN.length != 64){
  APPTOKEN = 'xxxxxxxxyyxxxxxxyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
      var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
      return v.toString(16);
  });
  localStorage.setItem("APPTOKEN",APPTOKEN);
}
var implode = function (k,v){
				    let vvv = [];
				    if(!v){
				        return "";
				    }
				    if(v){
				        for(let i  in v){
				            vvv.push(v[i]);
				        }
				    }
				    return vvv.join(k);
				};


var HTTP =  "{{ WZHOST+ (Defaultplus==''?'':Defaultplus+FENGE ) }}";

function apptongxin(url,canshu,hanshu){
  var request = new FormData();  
  url = url.replace(/\//g,FENGE );          
  canshu.apptoken=APPTOKEN;
  canshu.atime=Date.parse(new Date())/1000;
  $.each(canshu, function(i, obj) { request.append(i, obj); });    
  var $zuhe = (implode('_',url.split(FENGE))+'_'+implode('_',canshu)); 
  request.append("key", hex_md5("fhdfh"+$zuhe+"fhdfh")); 

  $.ajax({
      type : "POST",
      url : HTTP+url,
      data : request,
      processData : false,
      contentType : false, 
      success : function(result) {
          hanshu(result);
      },
      error : function(e){
        layer.msg(e.statusText,{offset: 'c'});
      }
  });
}

function pay(){
  var jine =[2,6,12,30,50,100,200,500];
  var html = `
    <form class="layui-form"  style="padding-top:20px;">
    <div style="padding:10px 20px;">`;

      for(var n in jine){
        html+=`<input type="radio" name="jine" `+(n==1?'checked="checked"':"")+` value="`+jine[n]+`" title="`+jine[n]+`元">`;
      }
      
   
    html +=`</div>
   <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="ljipay">立即充值</button>
      
    </div>
  </div>
</form>
  `;
   var mpay = layer.open({
        title:"<span style='color:red;'>选择金额进行充值</span>",
        type: 1,
        skin: 'layui-layer-rim',
        area: ['320px','300px'],
        shadeClose: true,
        offset:'200px',
        content: html,
        success: function(layero, index){
          layui.form.on('submit(ljipay)', function(data){
           
            window.location.href= "{{KuoLink(['pay','payment'])}}?money="+data.field.jine+'&type=0&remarks='+encodeURIComponent(window.location.href);

            return false;
          });
          layui.form.render();
        }
    });

}

function login(callback,canshu){
  var html = `
  <form class="layui-form" action="" style="padding-top:20px;">

  <div class="layui-form-item">
    <label class="layui-form-label">登陆账号</label>
    <div class="layui-input-block">
      <input type="text" name="account" placeholder="请输入登陆账号" style="width:90%;" autocomplete="off" class="layui-input" lay-verify="required">
    </div>
  </div>
   <div class="layui-form-item">
    <label class="layui-form-label">登陆密码</label>
    <div class="layui-input-block">
      <input type="password" name="password"  placeholder="请输入登陆密码"  style="width:90%;" autocomplete="off" class="layui-input" lay-verify="required">
    </div>
  </div>
   <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="ljilogin">立即登陆</button>
    </div>
  </div>
</form>
  `;
    layer.open({
        title:"<span style='color:red;'>快捷 登陆/注册</span>",
        type: 1,
        skin: 'layui-layer-rim',
        area: ['320px','250px'],
        offset:'200px',
        content: html,
        success: function(layero, index){
          layui.form.on('submit(ljilogin)', function(data){
              apptongxin( "login/account_kjlogin",data.field,function(data){
                  if(data.code == 1){
                    UID = data.data.id;
                    layer.closeAll();
                    callback && callback(canshu);
                  }
                  layer.msg(data.msg);
              });  
              return false;
          });

          layui.form.render();
        }
    });
}
</script>